﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class 队列 : MonoBehaviour
{

    //先进先出

    Queue queue = new Queue();
    Queue<int> queue2 = new Queue<int>();

    // Start is called before the first frame update
    void Start()
    {
        queue.Enqueue("1");
        queue.Enqueue("2");

        queue2.Enqueue(1);
        queue2.Enqueue(2);
        queue2.Enqueue(3);

        Debug.Log(queue.Dequeue());//出队列
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
